<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title>
    <link href="/styles/base.css" rel="stylesheet" type="text/css">
    <link href="/js/datepicker/datepicker.css" rel="stylesheet">
    <link href="/styles/wenda.css" rel="stylesheet" type="text/css">
    <link href="/styles/search.css" rel="stylesheet" type="text/css">
    <link href="/js/plugins/jqPaginator/jqPagination.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="/js/plugins/jqPaginator/jq-paginator.min.js"></script>
    <script type="text/javascript" src="/js/system/wenda.js"></script>
    <style>
        body {
            line-height: 20px;
            background: #FFF;
            padding-top: 0px;
        }
    </style>
    <script>
        $(function () {
            $('.desc').click(function () {
                var tid = $(this).data('id');
                window.location.href='/wenda/detail?id='+tid;
            })

            //查询
            $("#_j_index_search_btn_all").click(function () {
                $("#searchForm").submit();
            })





        })
    </script>
</head>



<body style="position: relative;">
<#assign currentNav="wenda">
<#include "../common/navbar.ftl">


<div class="wrapper wrapper-new">

    <div class="p_upw">
        <div class="uptime_p">
            <a href="/wenda?state=0" id ="hotIssue" class="strategySearch upt_on">旅游问答</a>
            <span>>><span>
            <a href="/wenda?state=1" id="newIssue" data-state="1" class="strategySearch "></a>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div>

    <div class="col-main">
        <form action="/wenda/search" method="post" id="searchForm">

            <div class="searchbar" id="_j_index_search_bar_all">
                <div class="search-wrapper">
                    <div class="search-input">
                        <input name="keyword" type="text" value="${qo.keyword!}" placeholder="提问前先搜搜是否已经有骡骡提问过" id="_j_index_search_input_all" autocomplete="off">
                    </div>
                </div>
                <div class="search-button" id="_j_index_search_btn_all">
                    <a role="button" href="javascript:"><i class="icon-search"></i></a>
                </div>
            </div>



            <div class="newcate-wrap _j_qa_list">
                <div class="p_upw">
                    <div class="uptime_p">

                        <a href="/wenda?state=0" id ="hotIssue" class="strategySearch upt_on">可能想问</a>
                        <span>|</span>
                        <a href="/wenda?state=-1" id="newIssue" data-state="-1" class="strategySearch ">待回答问题</a>
                        <div class="clear"></div>
                    </div>
                    <div class="clear"></div>
                    <input type="hidden" name="state" id="state" value="${(qo.state)!}">
                </div>


                <div class="wid clearfix">
                <div class="ser-nums">
                    <div class="sr-nums">
                        <p class="ser-result-primary">
                            以下是为您找到的“${(qo.keyword)!}”相关结果${(page.totalElements)!0}条
                        </p>
                    </div>
                </div>
                <div class="flt1 ser-lt" id="_j_search_result_left">

                    <#if page.content?size  &gt; 0 >
                        <div class="_j_search_section">
                            <div class="att-list">
                                <ul>
                                    <li>
                                        <div class="clearfix">

                                            <#list page.content as t>
                                                <div class="flt1"><a href="javascript:;" target="_blank" class="_j_search_link"></a></div>
                                                <div class="ct-text ">
                                                    <h3>
                                                        <a href="/wenda/detail?id=${t.id}" target="_blank"
                                                           class="_j_search_link">${t.title!}</a>
                                                    </h3>
                                                    <p class="seg-desc">${t.summary!}</p>
                                                    <ul class="seg-info-list clearfix">
                                                        <li>
                                                            <a href="javascript:;" target="_blank" class="_j_search_link">${t.destName}</a>
                                                        </li>
                                                        <li>
                                                            浏览(${t.viewNum!0})
                                                        </li>
                                                        <li>
                                                            回答(${t.replyNum!0})
                                                        </li>
                                                        <li>
                                                            ${(t.createTime?string('yyyy年MM月dd日'))!}
                                                        </li>
                                                    </ul>
                                                </div>
                                            </#list>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </#if>
        </form>
        <div style="float: right">
            <div style="float: left;"><span style="line-height:30px"> 共${page.totalPages!}页 / ${page.totalElements}条&nbsp;&nbsp;&nbsp;</span>
            </div>
            <div id="pagination" class="jq-pagination" style="display: inline;"></div>
        </div>

        <script>
            $("#pagination").jqPaginator({
                totalPages: ${page.totalPages!0},
                visiblePages: 5,
                currentPage: ${page.number+1}|| 1,
                prev
            :
            '<a class="prev" href="javascript:void(0);">上一页<\/a>',
                next
            :
            '<a class="next" href="javascript:void(0);">下一页<\/a>',
                page
            :
            '<a href="javascript:void(0);">{{page}}<\/a>',
                last
            :
            '<a class="last" href="javascript:void(0);" >尾页<\/a>',
                onPageChange
            :

            function (page, type) {
                if (type == 'change') {
                    $("#currentPage").val(page);
                    $("#pageForm").submit();
                }

            }
            })
        </script>
        <form id = "pageForm" action="/wenda/search" method="post">
            <input type="hidden" name="currentPage" id="currentPage" value="1">
            <input type="hidden" name="keyword"  value="${qo.keyword!}">

            </div>
        </form>





                </div>
            </div>
            <#include "../common/footer.ftl">
</body>

</html>